<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

/*
Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});
Route::get('hello/:name', 'index/hello');
*/
//用户维度
//获取所有用户名
Route::get('/api/user/get_all','ApiPort/user_get_all');
Route::get('/api/user/get_all_for_login','ApiPort/user_get_all_for_login');
//新增用户
Route::post('/api/user/add','ApiPort/user_add');
//修改用户
Route::post('/api/user/edit','ApiPort/user_edit');
//删除用户
Route::post('/api/user/delete','ApiPort/user_delete');
//修改密码
Route::post('/api/user/change_password','ApiPort/user_change_password');
//重置密码
Route::post('/api/user/replace_password','ApiPort/user_replace_password');

//登录和退出
Route::post('/api/login','ApiPort/login');
Route::post('/api/logout','ApiPort/logout');
Route::post('/api/get_login_state','ApiPort/get_login_state');


//获取所有
Route::get('/api/goods/get_all','ApiPort/goods_get_all');
//获取单个
Route::get('/api/goods/get_one','ApiPort/goods_get_one');
//增添商品
Route::post('/api/goods/create','ApiPort/goods_create');
//删除商品
Route::post('/api/goods/delete','ApiPort/goods_delete');
//修改商品
Route::post('/api/goods/edit','ApiPort/goods_edit');
//获取简易数据
Route::get('/api/goods/easy_get','ApiPort/goods_easy_get');
//出入库
Route::post('/api/storage','ApiPort/storage');
//查询入库单
Route::get('/api/storage/in/get_all','ApiPort/in_daily');
//查询出库单
Route::get('/api/storage/out/get_all','ApiPort/out_daily');
//查询所有单号
Route::get('/api/storage/all_doc','ApiPort/storage_get_doc');
//查询某一单号的详情
Route::get('/api/storage/detail_by_doc','ApiPort/storage_get_data_by_doc');

//根据物品ID查询出入库信息
Route::get('/api/storage/detail_by_id','ApiPort/daily_get_by_goods_id');

//出入库的修改与撤销
Route::post('/api/storage_edit','ApiPort/storage_edit');
//出入库的删除
Route::post('/api/storage_delete','ApiPort/storage_delete');



//分类的增删改查
Route::get('/api/category/get','ApiPort/category_get');
Route::post('/api/category/edit','ApiPort/category_edit');//增改
Route::post('/api/category/delete','ApiPort/category_delete');

//区域的增删改查
Route::get('/api/local/get','ApiPort/local_get');
Route::post('/api/local/edit','ApiPort/local_edit');//增改
Route::post('/api/local/delete','ApiPort/local_delete');

//部门的增删改查
Route::get('/api/depart/get','ApiPort/depart_get');
Route::post('/api/depart/edit','ApiPort/depart_edit');//增改
Route::post('/api/depart/delete','ApiPort/depart_delete');

//供货商的增删改查
Route::get('/api/suppliers/get','ApiPort/suppliers_get');
Route::post('/api/suppliers/edit','ApiPort/suppliers_edit');//增改
Route::post('/api/suppliers/delete','ApiPort/suppliers_delete');

//生成xlsx文件的json数据
Route::post('/api/generate/all','ApiPort/generate_all');

Route::get('/api/test','Test/test');

//生成报表的路由
Route::post('/api/generate_con','ApiPort/generate_con');